﻿(function (erpstore, $, undefined) {

	erpstore.formatCurrency = function (value) {
		return value.toFixed(2) + " €";
	}

	erpstore.elipsisWordAt = function (value, wordcount) {
		var result = value;
		$.ajax({
			type: 'GET',
			contentType : 'application/json',
			url : '/api/store/elipsiswordat',
			data : { input: value, wordcount: wordcount },
			async : false,
			success : function(data) {
				value = data;
			}
		});
		return value;
	}

	erpstore.resizeImage = function(value, width, height) {
		return value.replace('/{0}/{1}/', '/' + width + '/' + height + '/');
	}

} (window.erpstore = window.erpstore || {}, jQuery))